package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.YzrGrantMed;

public interface IYzrGrantMedDAO extends CrudRepository<YzrGrantMed, String> {

	//查找最大编号
	@Query("select max(mc.grantMedId) from YzrGrantMed mc where mc.grantMedId like ?1%")
	public String findId(String a);
	
	@Query("select mc from YzrGrantMed mc order by  mc.grantMedId desc")
	public List<YzrGrantMed> findAllGrant(Pageable pageable);
}
